Skip to content

[200_39] gf test --only#518

Merged
da-liii merged 12 commits intomainfrom
da/200_39/goldtest
Mar 21, 2026
Merged

[200_39] gf test --only#518
da-liii merged 12 commits intomainfrom
da/200_39/goldtest

Conversation

@da-liii
Copy link
Contributor

@da-liii da-liii commented Mar 21, 2026

No description provided.

da-liii and others added 12 commits March 21, 2026 12:57
- 新增 gf test 子命令,自动运行 tests 目录下所有 *-test.scm 文件
- 添加 tests/goldtest/liii/goldtest.scm 测试运行器
- test 命令使用 (liii sys) 中的 (executable) 获取可执行路径
- 添加 http-test 和 srfi-78-simple-stacktrace-test 环境变量控制
  - GOLDFISH_TEST_HTTP 控制 http 测试
  - GOLDFISH_TEST_STACKTRACE 控制 stacktrace 测试
- 默认关闭上述测试,需要设置环境变量才运行

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 将 GitHub Actions 中的测试命令从 bin/gf tests/test_all.scm
  改为 bin/gf test
- 更新 test 子命令帮助描述

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 添加 stacktrace-test-enabled? 函数
- 更新 should-run-test? 使用 cond 同时检查 http-test
  和 srfi-78-simple-stacktrace 测试
- 格式化 goldtest.scm

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 移除 http-test-enabled?、stacktrace-test-enabled? 函数
- 移除 should-run-test? 特殊判断函数
- find-test-files 恢复为通用实现,运行所有 *-test.scm 文件
- 特殊测试控制逻辑放在测试文件本身处理

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- test-path-join: let 改为 let*
- find-test-files: 使用 flat-map 替代 set! 和 for-each
- run-test-file: let 改为 let*
- display-summary: let 改为 let*,简化 failed 计算
- run-goldtest: 使用 let* 合并嵌套 let

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- goldtest.scm: 添加 parse-only-filter 和 filter-test-files 函数
- goldtest.scm: 使用 (scheme process-context) 获取 (command-line)
- goldtest.scm: 支持 --only PATTERN 参数过滤测试文件
- src/goldfish.hpp: 允许 test 子命令使用 --only 选项
- src/goldfish.hpp: 更新 test 子命令帮助信息,显示 --only 选项

示例用法:
  gf test --only json      (运行 json-test.scm 和 njson-test.scm)
  gf test --only sicp      (运行 sicp-test.scm)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolved conflicts:
- src/goldfish.hpp: 保留 test 子命令的 --only 选项帮助信息
- tests/goldtest/liii/goldtest.scm: 保留 --only 参数支持

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 移除多余的 newline,只保留一个

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@da-liii da-liii merged commit f3abde8 into main Mar 21, 2026
6 checks passed
@da-liii da-liii deleted the da/200_39/goldtest branch March 21, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant